#include <iostream>
#include <memory>

class Logger {
public:
    virtual void log(const std::string& message) = 0;
    virtual ~Logger() {}
};

class ConsoleLogger : public Logger {
public:
    void log(const std::string& message) override {
        std::cout << "Log: " << message << std::endl;
    }
};

class Application {
private:
    std::shared_ptr<Logger> logger;
public:
    // Constructor Injection
    Application(const std::shared_ptr<Logger>& logger) : logger(logger) {}

    void run() {
        logger->log("Application is running");
    }
};

int main() {
    auto logger = std::make_shared<ConsoleLogger>();
    Application app(logger);
    app.run();
    return 0;
}